<extend name="Public/base"/>

<block name="body">
    <div class="main-title">
        <h2>修改商品</h2>
    </div>
    <form action="{:U()}" method="post" class="form-horizontal">
          <input type="hidden" name="id" value="{$data.id}"/>
        <div class="form-item">
            <label class="item-label">商品名称</label>
            <div class="controls">
                <input type="text" class="text input-large" name="name" value="{$data.name}">
            </div>
            <label class="item-label">商品编码（唯一编码）</label>
            <div class="controls">
                <input type="text" class="text input-large" name="code" value="{$data.code}">
            </div>
            <label class="item-label">商品属于分类</label>
            <div class="controls">
                <select name="pCategoryId">
                    <volist name="pcategorylist" id="vo">
                        <option value="{$vo.id}" <if condition="$vo.id eq $data.pCategoryId ">selected="selected"</if>    <eq name="vo.type" value="2">style="background-color:#FFCCFF"</eq> <eq name="vo.isDisposal" value="1">style="background-color:#CCFFFF"</eq>><eq name="vo.type" value="2">-----</eq> {$vo.name} <eq name="vo.type" value="2">[进货商品分类]</eq> <eq name="vo.isDisposal" value="1">[处理品]</eq></option>	
                    </volist>
                </select>
            </div>
            
            <label class="item-label">开始售卖时间<span class="check-tips">只有在活动分类时才需要填写</span></label>
            <div class="controls">
                   <input type="text" class="text input-large time" name="upTime" value="{$data.upTime}">
            </div>
            <label class="item-label">结束售卖时间<span class="check-tips">只有在活动分类时才需要填写</span></label>
            <div class="controls">
                   <input type="text" class="text input-large time" name="downTime" value="{$data.downTime}">
            </div>
               
            <label class="item-label">商品计量单位</label>
            <div class="controls">
                <select name="unit">
                    <volist name="unitlist" id="vo">
                        <option value="{$vo}"  <if condition="$data.unit eq $vo">selected="selected"</if>>{$vo}</option>	
                    </volist> 	
                </select>
            </div>
            <label class="item-label">是否打印杯贴标签</label>
            <div class="controls">
                <select name="isNeedCupTip">
                    <option value="1" <eq name="data.isNeedCupTip" value="1">selected="selected"</eq>>是</option>
                    <option value="0" <eq name="data.isNeedCupTip" value="0">selected="selected"</eq>>否</option>                                                			
                </select>
            </div>
            <label class="item-label">
                门店销售价格
                <span class="check-tips"> 该商品进货价格<span style="color: red;">{$data.instockPrice}元</span></span>
            </label>
              <input type="number" class="text input-large" name="sellPrice" value="{$data.sellPrice}">
            <label class="item-label">当属于处理品分类时在哪个门店进行显示？</label>
            <div class="controls">
                <select name="disposalShopId">
				<option value="0"  selected="selected" >全部门店都可以显示</option>
                                <volist name="pcshoplist" id="vo">
                                    <option value="{$vo.id}" <if condition="$vo.id eq $data.disposalShopId ">selected="selected"</if>>在[{$vo.name}]显示该处理商品</option>
                                </volist>
                                			
                </select>
            </div>
             <label class="item-label">备注信息</label>
              <input type="text" class="text input-large" name="remark" value="{$data.remark}">
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);
                    return false;">返 回</button>
        </div>
    </form>
</block>


<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>

    <script type="text/javascript">
       $(function () {
            $('.time').datetimepicker({
                //format: 'yyyy-mm-dd hh:ii',
                format: 'yyyy-mm-dd hh:ii:ss',
                language: "zh-CN",
                minView: 2,
                autoclose: true
            });
        });
        //导航高亮
        highlight_subnav('{:U('SpProduct/index')}');
        
    </script>
</block>
